1. Field of the Invention
The present invention relates to an automatic programming apparatus for generating a numerical control (NC) program for numerically controlling a machine tool such as to cause a cutting tool to machine a workpiece into a product shape having a recess and one or more protrusions formed in the bottom surface inside the recess.
2. Description of the Prior Art
An example of the prior art of such automatic programming apparatuses is an automatic NC data generation apparatus shown in FIG. 14. As shown in the figure, the automatic NC data generation apparatus 60 comprises tool information storing means 61, shape recognizing means 62, machining region dividing means 63, tool selecting and tool path data generating means 64, and NC data generating means 65 (see Japanese Unexamined Patent Publication No. 5-228786).
The tool information storing means 61 stores, in advance, information containing at least the tool identification code and the tool diameter of each of a plurality of tools (such as end mills) used in the machining.
On the basis of computer aided design (CAD) data (product shape data) inputted appropriately, the shape recognizing means 62 performs the process of recognizing a product shape (the shape of a finished workpiece) having a recess and one or more protrusions formed in the bottom surface inside the recess. On the basis of this recognized product shape, the machining region dividing means 63 performs the process of dividing the shape of the workpiece into a plurality of machining regions each of which can be machined using a single tool.
The tool selecting and tool path data generating means 64 performs the process of selecting a tool to be used for each of the divided machining regions, from among the tools the information of which is stored in the tool information storing means 61, and then generating tool path data for the selected tool.
Specifically, for example, when a machining region is to be machined into the product 50 shape having a recess 51 and a protrusion 52 as shown in FIGS. 2 and 3, a concave surface 53 having the minimum curvature radius is first searched for from among a plurality of the concave surfaces 53 in the recess 51. Then, a tool having a diameter smaller than twice the curvature radius of the found concave surface 53 is extracted from the tool information storing means 61. Further, a wall 54 gap having the minimum spacing is searched for from among a plurality of the wall 54 gaps in the recess 51. Then, a tool having a diameter smaller than the distance of the found wall 54 gap is extracted from the tool information storing means 61.
Then, from among the extracted two tools, that having the smaller diameter is selected as one used for machining the machining region. Further, tool path data is generated for the selected tool. After that, the tool identification code and the tool path data of the selected tool are associated with each other, and then transmitted to the NC data generating means 65.
On the basis of the tool identification code and the tool path data of each machining region received from the tool selecting and tool path data generating means 64, the NC data generating means 65 generates a series of NC data for all the machining regions.
As such, in the generation of the tool path data in the automatic NC data generation apparatus 60, the minimum curvature radius of the concave surfaces 53 in the recess 51 and the minimum spacing of the wall 54 gaps in the recess 51 are recognized for each machining region, so that an appropriate tool to be used is selected automatically on the basis of this recognition. Then, tool path data is generated for the selected tool. On the basis of the tool path data generated for each machining region, NC data is generated for all the machining regions.
Nevertheless, according to the configuration of this automatic NC data generation apparatus 60, the recess 51 is machined using a single tool throughout the machining ranging from rough cutting to finishing. Further, the tool has a diameter smaller than the minimum curvature radius of the concave surfaces 53 in the recess 51 and smaller than the minimum spacing of the wall 54 gaps in the recess 51. This configuration is appropriate for finishing but not for rough cutting, because in rough cutting, when a portion to be cut off is larger than the tool diameter, a plurality of cutting operations become necessary in order to cut off the portion completely. This has the problem of a longer machining time.
That is, in rough cutting, if a tool having the largest applicable diameter was used, the number of necessary cutting operations would be reduced, and so would be the machining time. Nevertheless, such machining time reduction is not actually performed in the automatic NC data generation apparatus 60 described above.
Further, for the purpose of the optimum machining, in addition to the above-mentioned selection of the tool diameter, the shape and the material of the tool need to be selected or the tool length need to be set, depending on the material and the machining shape of the workpiece and the required machining accuracy. These selection and setting need the specialized knowledge or know-how of a machining specialist (user). Accordingly, in the selection of the tool to be used, it is preferable that the apparatus configuration allows the user to select appropriately the tool to be used.
The invention has been devised with considering these situations. An object of the invention is to provide an automatic programming apparatus for generating an NC program which permits efficient machining and which reflects the machining know-how of an individual user.